---
title: "audit_log_not_found"
description: "The requested audit log was not found"
---

<Danger>
err:unkey:data:audit_log_not_found
</Danger>


```json Example
{
  "meta": {
    "requestId": "req_2c9a0jf23l4k567"
  },
  "error": {
    "detail": "The requested audit log could not be found",
    "status": 404,
    "title": "Not Found",
    "type": "https://unkey.com/docs/api-reference/errors-v2/unkey/data/audit_log_not_found"
  }
}
```

## What Happened?

This error occurs when you're trying to retrieve or operate on a specific audit log entry that doesn't exist in the Unkey system. Audit logs record important actions and events that occur within your workspace.

Common scenarios that trigger this error:
- Using an incorrect audit log ID
- Requesting an audit log entry that has been deleted or expired
- Trying to access audit logs from a different workspace
- Typographical errors in audit log identifiers

Here's an example of a request that would trigger this error:

```bash
# Attempting to get a non-existent audit log entry
curl -X POST https://api.unkey.com/v2/audit.getLog \
  -H "Authorization: Bearer unkey_YOUR_API_KEY" \
  -d '{
    "logId": "log_nonexistent"
  }'
```

## How To Fix

Verify that you're using the correct audit log ID and that the log entry still exists in your workspace:

1. Check the audit log ID in your request for typos or formatting errors
2. Use the list audit logs endpoint to find valid log IDs
3. Verify you're working in the correct workspace
4. Consider that audit logs might have a retention period after which they're automatically deleted

Here's how to list recent audit logs in your workspace:

```bash
curl -X POST https://api.unkey.com/v2/audit.listLogs \
  -H "Authorization: Bearer unkey_YOUR_API_KEY" \
  -d '{
    "limit": 10
  }'
```

## Common Mistakes

- **Expired logs**: Trying to access audit logs beyond the retention period
- **Copy-paste errors**: Using incorrect log IDs from documentation examples
- **Workspace boundaries**: Attempting to access logs from another workspace
- **Permission issues**: Trying to access logs you don't have permission to view

## Related Errors
- [err:unkey:authorization:insufficient_permissions](../authorization/insufficient_permissions) - When you don't have permission to access audit logs
- [err:unkey:data:workspace_not_found](./workspace_not_found) - When the requested workspace doesn't exist
